package com.indexingsystem.boss.Vo;

import java.io.Serializable;

import com.indexingsystem.boss.entity.Pusers;
import com.indexingsystem.boss.entity.RoleGroups;
import com.indexingsystem.boss.entity.Roles;
import com.indexingsystem.boss.entity.UserInfos;
import com.indexingsystem.boss.entity.UserInstitution;
import com.indexingsystem.boss.entity.UserRole;

public class UserPublishVo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8834355345044212968L;
	
	
	private Pusers  pusers;
	
	private UserInfos  userInfos;
	
	private UserRole  userRole;
	
	private UserInstitution  userInstitution;
	
	private Roles roles;
	
	private RoleGroups roleGroups;

	public Pusers getPusers() {
		return pusers;
	}

	public void setPusers(Pusers pusers) {
		this.pusers = pusers;
	}

	public UserInfos getUserInfos() {
		return userInfos;
	}

	public void setUserInfos(UserInfos userInfos) {
		this.userInfos = userInfos;
	}

	public UserRole getUserRole() {
		return userRole;
	}

	public void setUserRole(UserRole userRole) {
		this.userRole = userRole;
	}

	public UserInstitution getUserInstitution() {
		return userInstitution;
	}

	public void setUserInstitution(UserInstitution userInstitution) {
		this.userInstitution = userInstitution;
	}

	public Roles getRoles() {
		return roles;
	}

	public void setRoles(Roles roles) {
		this.roles = roles;
	}

	public RoleGroups getRoleGroups() {
		return roleGroups;
	}

	public void setRoleGroups(RoleGroups roleGroups) {
		this.roleGroups = roleGroups;
	}

	public UserPublishVo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((pusers == null) ? 0 : pusers.hashCode());
		result = prime * result + ((roleGroups == null) ? 0 : roleGroups.hashCode());
		result = prime * result + ((roles == null) ? 0 : roles.hashCode());
		result = prime * result + ((userInfos == null) ? 0 : userInfos.hashCode());
		result = prime * result + ((userInstitution == null) ? 0 : userInstitution.hashCode());
		result = prime * result + ((userRole == null) ? 0 : userRole.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserPublishVo other = (UserPublishVo) obj;
		if (pusers == null) {
			if (other.pusers != null)
				return false;
		} else if (!pusers.equals(other.pusers))
			return false;
		if (roleGroups == null) {
			if (other.roleGroups != null)
				return false;
		} else if (!roleGroups.equals(other.roleGroups))
			return false;
		if (roles == null) {
			if (other.roles != null)
				return false;
		} else if (!roles.equals(other.roles))
			return false;
		if (userInfos == null) {
			if (other.userInfos != null)
				return false;
		} else if (!userInfos.equals(other.userInfos))
			return false;
		if (userInstitution == null) {
			if (other.userInstitution != null)
				return false;
		} else if (!userInstitution.equals(other.userInstitution))
			return false;
		if (userRole == null) {
			if (other.userRole != null)
				return false;
		} else if (!userRole.equals(other.userRole))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "UserPublishVo [pusers=" + pusers + ", userInfos=" + userInfos + ", userRole=" + userRole
				+ ", userInstitution=" + userInstitution + ", roles=" + roles + ", roleGroups=" + roleGroups + "]";
	}
}